package com.egg.basic.fegin;

import com.egg.basic.fegin.fallback.BasicEmailFeignClientFallback;
import com.egg.basic.model.request.EmailPost;
import com.egg.common.core.model.controller.FeignController;
import com.egg.common.core.model.response.ResponseData;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;


@FeignClient(
        name = "basic"
        , url = "${api.feign.url.basic:}"
        , path = FeignController.PATH_PREFIX
        , fallbackFactory = BasicEmailFeignClientFallback.class
)
public interface BasicEmailFeignClient {


    @PostMapping("/email/send")
    ResponseData<String> send(@RequestBody EmailPost param);


}
